import Vue from 'vue'
import Vuex from 'vuex'
import user from './user'
import permission from './permission'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {},
  getters: {
    addRoutes: (state) => state.permission.addRoutes,
    buttons: (state) => state.permission.buttons,
    permission_routes: (state) => state.permission.routes,
    userInfo: (state) => state.user.userInfo,
    avatar: (state) => state.user.avatar,
  },
  mutations: {},
  actions: {},
  modules: {
    user,
    permission,
  },
})
